package day03;
//条件运算符：
public class OperDemo6 {
    public static void main(String[] args) {
     /*
        int a =50;
        int flag  =a>10?1:0;
        System.out.println(flag);//1 a的值大于10，走第一个数字1

        int b=10,c=20;
        int max = b>c?b:c;
        System.out.println("max"+max);//max=20 b的值小于c的值，走左后一个值
       */

       int a =10;
       int flag =a>20? 1:2;
        System.out.println(flag);//2

        int b=500,c=29;
        int d =b+c>(a+c)*a? b:c;
        System.out.println(d);//500



    }
}
